package com.zang.netty.io.nio;

import com.zang.netty.io.model.enums.SocketEnum;

/**
 * @author Zhang Qiang
 * @Date 2019/7/19 9:58
 */
public class TimeClientByNio {

    public static void main(String[] args) {
        String host = SocketEnum.LOCALHOST.getStr();
        int port = SocketEnum.NIO_PORT.getNum();

        if (args != null && args.length > 0){
            try {
                port = Integer.valueOf(args[0]);
            } catch (NumberFormatException e){
                // 采用默认值
            }
        }
        new Thread(new TimeClientHandleByNio(host, port)).start();

    }

}
